package com.scs.application.modules.finance.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 记帐单明细
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "发票单明细表")
@TableName("finance_invoice_item")
public class InvoiceItem extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "关联id",
            length = "50",
            default_value = "",
            comment = ""
    )
    private String refId;

    @EntityFieldAnnotation(
            text = "发票单ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String invoiceId;

    @EntityFieldAnnotation(
            text = "商品ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "商品Code",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mscmCode;

    @EntityFieldAnnotation(
            text = "商品名称",
            length = "500",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "规格",
            length = "500",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "厂商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mfgId;

    @EntityFieldAnnotation(
            text = "厂商名称",
            length = "500",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mfgName;

    @EntityFieldAnnotation(
            text = "注册证号",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String certificateNo;

    @EntityFieldAnnotation(
            text = "批次",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String lot;

    @EntityFieldAnnotation(
            text = "单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "小计(元)",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double subtotalAmount;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    /**
     * 科室名称
     */
    @EntityFieldAnnotation(
            text = "科室名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptName;

    /**
     * 科室代码
     */
    @EntityFieldAnnotation(
            text = "科室代码",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptCode;

    /**
     * 关联记账单明细Id
     */
    @EntityFieldAnnotation(
            text = "关联记账单明细Id",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String sourceKey;

    /** 价格 */
    @EntityFieldAnnotation(
            text = "单价(元)",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double price;

    @EntityFieldAnnotation(
            text = "科室ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String deptId;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;
}
